Orthogonal sets of functions